package com.source.baseData.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.source.baseData.entity.SlaughterHouse;
import com.baomidou.mybatisplus.extension.service.IService;
import com.source.baseData.vo.SlaughterHouseAddressVo;
import com.source.baseData.vo.SlaughterHouseMapVo;
import com.source.labelAndBarcode.vo.SlaughterHouseVo;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author Joey
 * @since 2021-02-10
 */
public interface SlaughterHouseService extends IService<SlaughterHouse> {

    List<SlaughterHouseVo> findAllVo();

    List<SlaughterHouseVo> findAllOnPermission();

    List<SlaughterHouseVo> findAllOnPermissionAudit();

    List<SlaughterHouseVo> findAllOnDeletionAudit();

    SlaughterHouseVo findVoById(String id);

    IPage<SlaughterHouseVo> findAllVoOnPaginationAndPermission(Page<SlaughterHouseVo> pages);

    IPage<SlaughterHouseVo> findAlikeOnPAP(Page<SlaughterHouseVo> page, String keyWord);

    IPage<SlaughterHouseVo> findVoByNameAndP(Page<SlaughterHouseVo> page, String keyWord);

    IPage<SlaughterHouseVo> findAllOnMultiStatus(Page<SlaughterHouseVo> page, int status);

    IPage<SlaughterHouseVo> findAllOnPagination(Page<SlaughterHouseVo> page);

    int saveImage(SlaughterHouse sh, MultipartFile image, HttpServletRequest request) throws Exception;

    IPage<SlaughterHouseVo> findByUnChecked(Page<SlaughterHouseVo> page);

    List<SlaughterHouseVo> findByDistrict(String name);

    IPage<SlaughterHouseVo> findByUnCheckedAndKeyWord(String keyWord, Page<SlaughterHouseVo> page);

    /**
     * getAllSlaughterHouseMapVo 查询所有市场的id和名字
     * @return
     */
    List<SlaughterHouseMapVo> getAllSlaughterHouseMapVo();

    List<SlaughterHouseAddressVo> selectSlaughterHouseAddressVo();
}
